{% load i18n seahub_tags avatar_tags %}
    {% for notice in notices %}
        {% if notice.seen %}
        <tr class="read">
        {% else %}
        <tr class="unread">
        {% endif %}

            <td class="avatar-cell">
                {% if notice.msg_from %}
                <a href="{% url 'user_profile' notice.msg_from %}">{% avatar notice.msg_from 32 %}</a>
                {% else %}
                <img src={{notice.default_avatar_url}} width="32" height="32" class="avatar" alt="" />
                {% endif %}
            </td>
            <td>
                {% if notice.is_group_msg %}
                <p class="brief">{{ notice.format_group_message_title|safe }}</p>
                    {% if notice.format_group_message_detail %}
                <p class="detail">{{ notice.format_group_message_detail }}</p>
                    {% endif %}

                {% elif notice.is_file_uploaded_msg %}
                <p class="brief">{{ notice.format_file_uploaded_msg|safe }}</p>

                {% elif notice.is_repo_share_msg %}
                <p class="brief">{{ notice.format_repo_share_msg|safe }}</p>

                {% elif notice.is_repo_share_to_group_msg %}
                <p class="brief">{{ notice.format_repo_share_to_group_msg|safe }}</p>

                {% elif notice.is_group_join_request %}
                <p class="brief">{{ notice.format_group_join_request|safe }}</p>
                {% elif notice.is_file_comment_msg %}
                <p class="brief">{{ notice.format_file_comment_msg|safe }}</p>

                {% elif notice.is_guest_invitation_accepted_msg %}
                <p class="brief">{{ notice.format_guest_invitation_accepted_msg|safe }}</p>

                {% endif %}
            </td>
            <td>{{ notice.timestamp|translate_seahub_time }}</td>
        </tr>
    {% endfor %}
